import java.io.Serializable;
import java.util.ArrayList;


public class Receipt implements Serializable {

	public long total;
	public ArrayList<Good> goods;
	
	public Receipt() {
		total = 0;
	}
	public void addEntry(String description, long price, int number) {
		goods.add(new Good(description, price, number));
		total += number*price;
	}
	
	private static class Good {
		public String description;
		public long price;
		public int number;
		public Good(String description, long price, int number) {
			this.description = description;
			this.number = number;
			this.price = price;
		}
	}
	
}
